package task3_4new;

public class Policlinic {
Patient[] patientsbase;
int maxpatientcount;
int maxdoctorcount;
int doctorcount;
int patientcount;
Doctor[] doctorsbase;
public Policlinic(int maxpatients,int maxdoctors){
	this.doctorcount=0;
	this.maxdoctorcount= maxdoctors;
	this.patientcount=0;
	this.maxpatientcount=maxpatients;
	this.patientsbase=new Patient[maxpatients];
	this.doctorsbase=new Doctor[maxdoctors];
}

public Policlinic addPatient(Patient pat1){
	if (this.patientcount<this.maxpatientcount)
	{
	this.patientsbase[patientcount]= pat1;
	this.patientcount++;
	}
	
	return this;
}
public Policlinic addDoctor(Doctor doc1){
	if (this.doctorcount<this.maxdoctorcount)
	{
	this.doctorsbase[doctorcount]= doc1;
	this.doctorcount++;
	}
	
	return this;
}
public void showPatients(){
	System.out.printf("Count of Patients:%d",this.patientcount);
	System.out.println();
}
public void showDoctors(){
	System.out.printf("Count of Patients:%d",this.doctorcount);
	System.out.println();
}	
	
}


